
SConscript(['store/SConscript','common/SConscript','server/SConscript','client/SConscript',])

SConscript(['apps/SConscript'])


lib_sources = ['client/src/client.cpp','client/src/broker.cpp','common/src/packet.pb.cpp']

env = Environment()
env[ 'CCFLAGS' ] = '-g -O2 -fPIC -D_THREAD_SAFE -pthread'
env[ 'CPPPATH' ] = [ 'include','client/include', 'common/include', '../../../include', '/home/s/include', ]
env[ 'CPPFLAGS' ] = []
env[ 'OBJSUFFIX' ] = '.obj'
env[ 'LIBDIR' ] = '../../lib'
env[ 'LIBPATH' ] = [ 'lib','/home/s/lib/static', ]
env[ 'LIBS' ] = ['bocat_common','protobuf','boost_filesystem-mt', 'boost_system-mt', 'boost_thread-mt','z','crypto','pthread',]

# static library
env.StaticLibrary( 'lib/libsakcab_access.a', lib_sources )

import os
arch = os.uname()[4]
if ('i386' == arch) :
    # shared library
    env.SharedLibrary( 'lib/libsakcab_access.so', lib_sources, LINKFLAGS='-Wl,-E' )
#elif ('x86_64' == arch) : 
#   # shared library
#   env.SharedLibrary( 'lib/libsakcab_access.so', lib_sources )




